package form.utils {
	import flash.display.DisplayObject;
	
	public class HierarchyUtils {
		public static function isAncestor(ancestor:DisplayObject, descendant:DisplayObject):Boolean {
			var parent:DisplayObject = descendant.parent;
			while (parent != null) {
				if (parent == ancestor) { return true; }
				parent = parent.parent;
			}
			return false;
		}
	}
}